<?php

/**
 * 后台路由
 * 基本设置
 */


/**
 * 后台权限
 */
Route::group(['prefix'=>'auth','namespace'=>'Auth'],function(){
    Route::get('action/del', 'ActionController@setDel');
    Route::post('action/{id}', 'ActionController@update');
    Route::resource('action', 'ActionController');
    Route::get('adminlog', 'AdminController@getLoginList');
    Route::post('admin/pwd', 'AdminController@setPwd');
    Route::post('admin/pwd2', 'AdminController@setPwd2');
    Route::post('admin/{id}', 'AdminController@update');
    Route::resource('admin', 'AdminController');
});

/**
 * 基础管理
 */
Route::group(['prefix'=>'app','namespace'=>'App'],function(){
    Route::post('ext/{id}', 'ExtController@update');
    Route::resource('ext', 'ExtController');
    Route::post('cate/{id}', 'CategoryController@update');
    Route::resource('cate', 'CategoryController');
    Route::resource('area', 'AreaController');
    Route::any('news', 'NewsController@index');
    Route::resource('yzm', 'YzmController');
    Route::resource('ad', 'AdController');
});

/**
 * 用户管理
 */
Route::group(['prefix'=>'member','namespace'=>'Member'],function(){
    Route::get('user/del', 'UserController@setDel');
    Route::post('user/{id}', 'UserController@update');
    Route::resource('user', 'UserController');
    //////////////个人可选信息处理
    Route::post('staff/option/edu-set', 'StaffController@setOptionEdu');
    Route::post('staff/option/work-set', 'StaffController@setOptionWork');
    Route::post('staff/option/family-set', 'StaffController@setOptionFamily');
    Route::post('staff/option/checks', 'StaffController@getChecks');
    Route::post('staff/option/comment-set', 'StaffController@setOptionComment');
    Route::post('staff/option/fac-will', 'StaffController@getFacWills');
    Route::post('staff/option/fac-will-set', 'StaffController@setOptionFacWill');
    Route::post('staff/option/com-will', 'StaffController@getComWills');
    Route::post('staff/option/com-will-set', 'StaffController@setOptionComWill');
    Route::post('staff/option/file-set', 'StaffController@setFile');
    Route::get('staff/option-get', 'StaffController@editOption');
    //////////////个人可选信息处理
    Route::post('staff/{id}', 'StaffController@update');
    Route::resource('staff', 'StaffController');
    //////////////企业可选信息处理
    Route::post('company/option/legal-set', 'CompanyController@setOptionLegal');
    Route::post('company/option/com-set', 'CompanyController@setOptionCom');
        //企业产品
    Route::get('company/option/product-get', 'CompanyController@getOptionPros');
    Route::post('company/option/product-set', 'CompanyController@setOptionPros');
        //产品风格
    Route::get('company/option/style-get', 'CompanyController@getOptionStyles');
    Route::post('company/option/style-set', 'CompanyController@setOptionStyles');
        //产品种类
    Route::get('company/option/proType-get', 'CompanyController@getOptionProTypes');
    Route::post('company/option/proType-set', 'CompanyController@setOptionProTypes');
        //款式数量
    Route::get('company/option/design-get', 'CompanyController@getOptionDesigns');
    Route::post('company/option/design-set', 'CompanyController@setOptionDesigns');
        //工厂设备
    Route::get('company/option/equip-get', 'CompanyController@getOptionEquips');
    Route::post('company/option/equip-set', 'CompanyController@setOptionEquips');
        //产量产能
    Route::get('company/option/yield-get', 'CompanyController@getOptionYields');
    Route::post('company/option/yield-set', 'CompanyController@setOptionYields');
        //工厂环境
    Route::post('company/option/facEnv-set', 'CompanyController@setOptionFacEnvs');
        //公司环境
    Route::post('company/option/comEnv-set', 'CompanyController@setOptionComEnvs');
    Route::get('company/option-get', 'CompanyController@editOption');
    //////////////企业可选信息处理
    Route::post('company/catesbypid', 'CompanyController@getCatesByPid');
    Route::post('company/citysbypid', 'CompanyController@getCitysByPid');
    Route::post('company/{id}', 'CompanyController@update');
    Route::resource('company', 'CompanyController');
});

/**
 * 招聘管理
 */
Route::group(['prefix'=>'job','namespace'=>'Job'],function(){
    Route::post('jobsbystafftype', 'JobController@getJobsByStaffType');
    Route::resource('job', 'JobController');
    Route::get('company/del', 'CompanyController@setDel');
    Route::post('company/joblist-get', 'CompanyController@getJobsByUid');
    Route::post('company/{id}', 'CompanyController@update');
    Route::resource('company', 'CompanyController');
//    Route::resource('staff', 'StaffController');
});

/**
 * 订单管理
 */
Route::group(['prefix'=>'order','namespace'=>'Order'],function(){
    //订单其他信息
    Route::post('bale/other/design-set', 'BaleController@setOtherDesigns');
    Route::post('bale/other/style-set', 'BaleController@setOtherStyles');
    Route::post('bale/other/orderType-set', 'BaleController@setOtherOrderTypes');
    Route::post('bale/other/orderType-get', 'BaleController@getOtherOrderTypes');
    Route::post('bale/other/stuff-set', 'BaleController@setOtherStuffs');
    Route::post('bale/other/stuff-get', 'BaleController@getOtherStuffs');
    Route::post('bale/other/deplete-set', 'BaleController@setOtherDepletes');
    Route::post('bale/other/deplete-get', 'BaleController@getOtherDepletes');
    Route::post('bale/other/img-set', 'BaleController@setOtherImg');
    Route::post('bale/other/size-set', 'BaleController@setOtherSizes');
    Route::post('bale/other/size-get', 'BaleController@getOtherSizes');
    Route::get('bale/other', 'BaleController@editOther');
    //订单基本信息
    Route::get('bale/del', 'BaleController@setDel');
    Route::post('bale/basic', 'BaleController@setBasic');
    Route::post('bale/basic/outType', 'BaleController@getOutTypes');
    Route::get('bale/basic', 'BaleController@edit');
    Route::resource('bale', 'BaleController');
    Route::resource('temp', 'TempController');
    Route::resource('make', 'MakeController');
    Route::resource('fabric', 'FabricController');
    Route::resource('contract', 'ContractController');
});

///**
// * 财务管理
// */
//Route::group(['prefix'=>'finance','namespace'=>'Finance'],function(){
//    Route::resource('account', 'AccountController');
//    Route::resource('third', 'ThirdController');
//    Route::resource('record', 'RecordController');
//});